﻿using System.Runtime.InteropServices;

namespace WirelessAccessPoint.InteropServices
{
    /// <summary>
    /// The MIB_IPNETROW structure contains information for an Address
    /// Resolution Protocol (ARP) table entry for an IPv4 address.
    /// </summary>
    [StructLayout(LayoutKind.Sequential)]
    public struct MIB_IPNETROW
    {
        /// <summary>
        /// The index of the adapter.
        /// </summary>
        public uint dwIndex;

        /// <summary>
        /// The length, in bytes, of the physical address.
        /// </summary>
        public uint dwPhysAddrLen;

        /// <summary>
        /// The physical address.
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
        public byte[] bPhysAddr;

        /// <summary>
        /// The IPv4 address.
        /// </summary>
        public uint dwAddr;

        /// <summary>
        /// The type of ARP entry.
        /// </summary>
        public MIB_IPNET_TYPE dwType;
    }
}
